package com.itheima.io.output;


import java.io.FileOutputStream;
import java.io.IOException;

public class OutputDemo2 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("day11_IO流_字节流\\b.txt",false);

        //写入数据
        String s = System.lineSeparator();
        fos.write("静夜思".getBytes());
        fos.write(s.getBytes());
        fos.write("床前明月光，".getBytes());
        fos.write(s.getBytes());
        fos.write("疑是地上霜；".getBytes());
        fos.write(s.getBytes());
        fos.write("举头望明月，".getBytes());
        fos.write(s.getBytes());
        fos.write("低头思故乡。".getBytes());
        fos.write(s.getBytes());

        fos.close();
    }
}
